package Models;

import java.util.ArrayList;

/**
 * @author Morten
 */
public class Supplier
{
	private static int nextId = 100;
	private int id;
	private String name, address, city, contact;
	private int zipCode, phoneNo, cvr;
	private ArrayList<Order> orders;
	private boolean activated = true;

	public Supplier(String name, String address, int zipCode, String city, int phoneNo, String contact, int cvr)
	{
		this.edit(name, address, zipCode, city, phoneNo, contact, cvr);
		this.id = Supplier.nextId;
		Supplier.nextId++;
	}

	public void edit(String name, String address, int zipCode, String city, int phoneNo, String contact, int cvr)
	{
		this.setName(name);
		this.setAddress(address);
		this.setZipCode(zipCode);
        this.setCity(city);
        this.setPhoneNo(phoneNo);
        this.setContact(contact);
		this.setCvr(cvr);
	}

	public String getAddress()
	{
		return address;
	}

	public String getCity()
	{
		return city;
	}

	public String getContact()
	{
		return contact;
	}

	public int getCvr()
	{
		return cvr;
	}

	public int getId()
	{
		return id;
	}

	public String getName()
	{
		return name;
	}

	public ArrayList<Order> getOrders()
	{
		return orders;
	}

	public int getPhoneNo()
	{
		return phoneNo;
	}

	public int getZipCode()
	{
		return zipCode;
	}

	public boolean isActivated()
	{
		return activated;
	}

	public void setActivated(boolean activated)
	{
		this.activated = activated;
	}

	public void setAddress(String address)
	{
		this.address = address;
	}

	public void setCity(String city)
	{
		this.city = city;
	}

	public void setContact(String contact)
	{
		this.contact = contact;
	}

	public void setCvr(int cvr)
	{
		this.cvr = cvr;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}

	public void setOrders(ArrayList<Order> orders)
	{
		this.orders = orders;
	}

	public void setPhoneNo(int phoneNo)
	{
		this.phoneNo = phoneNo;
	}

	public void setZipCode(int zipCode)
	{
		this.zipCode = zipCode;
	}
}